// main.cpp

#include <iostream>
#include "module_cpp.h"

namespace Fake {
static void printf_fuinction(int32_t printf_fuinction_data) {
  std::cout << "Received callback with data: " << printf_fuinction_data << std::endl;
}
}  // namespace Fake

int32_t main() {
  int32_t main_res{0};

  try {
    const Fake::CallbackFunction callback = [](int32_t callback_data) {
      Fake::printf_fuinction(callback_data);
    };

    Fake::register_callback(callback);

    main_res = 0;
  } catch (...) {
    std::cerr << "Exception occurred" << std::endl;
    main_res = 1;
  }

  return main_res;
}
